import request from '@/utils/request'
// 获取所有权限点
export const getPermission = () => request({
  url: '/sys/permission'
})
// 删除权限点
export const removePerm = (id) => request({
  url: '/sys/permission/' + id,
  method: 'DELETE'
})
// 添加权限点
export const addPerm = (data) => request({
  url: '/sys/permission',
  method: 'post',
  data
})
// 根据id获取权限详情
export const getPremById = (id) => request({
  url: '/sys/permission/' + id
})
// 根据id更新对应的权限
export const editPermById = (data) => request({
  url: '/sys/permission/' + data.id,
  method: 'put',
  data
})
